package com.telchina.common.enums;

import cn.hutool.core.util.ArrayUtil;

/**
 * 并单单据状态
 */
public enum ConsStatusEnum {

    /**
     * 未并单
     */
    UNMERGE("0", "未并单"),

    /**
     * 主单
     */
    MAESTER("2", "主单"),

    /**
     * 附单
     */
    SLAVE("1", "附单");



    private final String code;
    private final String info;

    public static ConsStatusEnum getValueOf(String value) {
        return ArrayUtil.firstMatch(replyType -> replyType.getCode().equals(value), ConsStatusEnum.values());
    }

    private ConsStatusEnum(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public String getCode() {
        return this.code;
    }

    public String getInfo() {
        return this.info;
    }
}